{% extends "buyer/base.html" %}

{% load static %}

{% block content %}
    	<div class="main_wrap clearfix">
		<div class="l_wrap fl clearfix">
			<div class="new_goods">
				<h3>新品推荐</h3>
				<ul>
					<li>
						<a href="#"><img src="images/goods/goods001.jpg"></a>
						<h4><a href="#">进口柠檬</a></h4>
						<div class="prize">￥3.90</div>
					</li>
					<li>
						<a href="#"><img src="images/goods/goods002.jpg"></a>
						<h4><a href="#">玫瑰香葡萄</a></h4>
						<div class="prize">￥16.80</div>
					</li>
				</ul>
			</div>
		</div>

		<div class="r_wrap fr clearfix">
			<div class="sort_bar">
				<a href="#" class="active">默认</a>
				<a href="#">价格</a>
				<a href="#">人气</a>
			</div>

			<ul class="goods_type_list clearfix">
                {% for commodity in commoditys %}
    				<li>
					<a href="/Buyer/detail/{{ commodity.id }}/"><img src="/static/buyer/images/goods/goods003.jpg"></a>
					<h4><a href="detail.html">{{ commodity.commodity_name }}</a></h4>
					<div class="operate">
						<span class="prize">￥{{ commodity.commodity_price }}</span>
						<span class="unit">{{ commodity.commodity_price }}/500g</span>
						<a href="#" class="add_goods" title="加入购物车"></a>
					</div>
				</li>
                {% endfor %}
			</ul>

			<div class="pagenation">
				<a href="/Buyer/list/{{ type_id }}/{{ previous_page }}/"><上一页</a>
                {% for page in page_range %}
                    <a href="/Buyer/list/{{ type_id }}/{{ page }}/">{{ page }}</a>
                {% endfor %}
				<a href="/Buyer/list/{{ type_id }}/{{ next_page }}/">下一页></a>
			</div>
		</div>
	</div>
{% endblock %}
{#				<a href="#" class="active">1</a>#}
{#				<a href="#">2</a>#}
{#				<a href="#">3</a>#}
{#				<a href="#">4</a>#}
{#				<a href="#">5</a>#}